<?php	
/*\
 *
 *
 *
 *
\*/	oh_module_header();

#module required library
if (function_exists("mysql_connect")) {
	require_once(dirname(__FILE__)."/ezsql/shared/ez_sql_core.php");
	require_once(dirname(__FILE__)."/ezsql/mysql/ez_sql_mysql.php");
} else {
	class ezSQL_mysql {}
}

#module main function
function oh_function_mysql($m) {
	return oh_this();
}

#module main class
class oh_class_mysql extends ezSQL_mysql {		
	function oh_class_mysql() {
		global $oh;
		if (function_exists("mysql_connect")) {
			$this->ezSQL_mysql($oh['db']['username'],$oh['db']['password'],$oh['db']['name'],$oh['db']['host']);
		} else {
			oh_dump("Error on connect MYSQL.");
		}
	}
	/*
	function is_ready() {
		return $this->ready;
	}
	function error() {
		$error = mysql_error();
		if (strlen($error)>0) {
			echo oh_debug_div_open();
				echo $error;
				echo oh_debug_small_open();
				echo oh_debug_at("error");			
				echo oh_debug_small_close();
				echo oh_debug_pre_open();			
				var_dump( ($this->last_query) );
				echo oh_debug_pre_close();
			echo oh_debug_div_close();
		}
	}
	*/
}
